Jump to content

Template talk:Revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

March 2010

[edit]

All the #ifexist calls in this are now overloading WP:REFUND and archives 2 and 3; in particular, only stale requests on WP:REFUNDC show afd links, and new ones do not. Are all the variants really necessary? —Korath (Talk) 21:11, 16 March 2010 (UTC)[reply]

Interesting, I'm not sure why the new requests aren't displaying 'afd' links. For now I have trimmed the parser calls though. Arbitrarily0 (talk) 21:16, 16 March 2010 (UTC)[reply]

Need code review before reducing Expensive parser function count by about half

[edit]

Recommended change, pending review:

Please impliment the changes in the sandbox[1].

This template uses 6 of the 500 "Expensive parser function count" limit.

I have nested the code that displays the 2nd, 3rd, and 4th AFD discussions so {{#ifexists:}} is only called if there has been an earlier AFD.

I ran some tests. While there is an increase of up to 25% in the Post-expand include size and up to 60% in the Highest expansion depth for pages with 2 or more AFD discussions, there is a reduction of 3 in Expensive parser function count for pages with no AFDs, of 2 for those with 1 AFDs, and 2 for those with 2 AFDs.

In some cases there is a slowdown of up to 33%.

Here are the detailed results of my tests:

test results
Page which ever existed 87654:

CPU time usage	0.016 seconds
Real time usage	0.018 seconds
Preprocessor visited node count	65/1,000,000
Post-expand include size	1,079/2,097,152 bytes
Template argument size	377/2,097,152 bytes
Highest expansion depth	5/40
Expensive parser function count	6/500
Unstrip recursion depth	0/20
Unstrip post-expand size	2/5,000,000 bytes
Number of Wikibase entities loaded	0/400

sandbox|Page which ever existed 87654:

CPU time usage	0.012 seconds - 0.004 seconds faster
Real time usage	0.016 seconds - 0.002 seconds faster
Preprocessor visited node count	53/1,000,000 - 8 fewer
Post-expand include size	992/2,097,152 bytes - 87 fewer
Template argument size	290/2,097,152 bytes - 87 fewer
Highest expansion depth	5/40 - unchanged
Expensive parser function count	3/500 - 3 fewer
Unstrip recursion depth	0/20 - unchanged
Unstrip post-expand size	2/5,000,000 bytes - unchanged
Number of Wikibase entities loaded	0/400 - unchanged


Template:User AZ NATO - deleted after MFD:

CPU time usage	0.020 seconds
Real time usage	0.028 seconds
Preprocessor visited node count	69/1,000,000
Post-expand include size	1,092/2,097,152 bytes
Template argument size	294/2,097,152 bytes
Highest expansion depth	5/40
Expensive parser function count	6/500
Unstrip recursion depth	0/20
Unstrip post-expand size	2/5,000,000 bytes
Number of Wikibase entities loaded	0/400

sandbox|Template:User AZ NATO:

CPU time usage	0.016 seconds - 0.004 seconds faster
Real time usage	0.022 seconds - 0.006 seconds faster
Preprocessor visited node count	57/1,000,000 - 12 fewer
Post-expand include size	1,029/2,097,152 bytes - 63 fewer
Template argument size	231/2,097,152 bytes - 63 fewer
Highest expansion depth	5/40 - unchanged
Expensive parser function count	3/500 - 3 fewer
Unstrip recursion depth	0/20 - unchanged
Unstrip post-expand size	2/5,000,000 bytes - unchanged
Number of Wikibase entities loaded	0/400 - unchanged

Main page - survived MFD:

CPU time usage	0.016 seconds
Real time usage	0.022 seconds
Preprocessor visited node count	75/1,000,000
Post-expand include size	1,033/2,097,152 bytes
Template argument size	135/2,097,152 bytes
Highest expansion depth	6/40
Expensive parser function count	6/500
Unstrip recursion depth	0/20
Unstrip post-expand size	2/5,000,000 bytes
Number of Wikibase entities loaded	0/400

sandbox|Main page:

CPU time usage	0.016 seconds - unchanged
Real time usage	0.020 seconds - 0.002 seconds faster
Preprocessor visited node count	63/1,000,000 - 12 fewer
Post-expand include size	1,006/2,097,152 bytes - 27 fewer
Template argument size	108/2,097,152 bytes - 27 fewer
Highest expansion depth	6/40 - unchanged
Expensive parser function count	3/500 - 3 fewer
Unstrip recursion depth	0/20 - unchanged
Unstrip post-expand size	2/5,000,000 bytes - unchanged
Number of Wikibase entities loaded	0/400 - unchanged

Wikipedia - survived 4+ AFDs:

CPU time usage	0.016 seconds
Real time usage	0.029 seconds
Preprocessor visited node count	87/1,000,000
Post-expand include size	1,508/2,097,152 bytes
Template argument size	162/2,097,152 bytes
Highest expansion depth	6/40
Expensive parser function count	6/500
Unstrip recursion depth	0/20
Unstrip post-expand size	2/5,000,000 bytes
Number of Wikibase entities loaded	0/400

sandbox|Wikipedia:

CPU time usage	0.016 seconds - unchanged
Real time usage	0.020 seconds - 0.009 seconds faster
Preprocessor visited node count	87/1,000,000 - unchanged
Post-expand include size	1,958/2,097,152 bytes - 450 MORE
Template argument size	162/2,097,152 bytes - unchanged
Highest expansion depth	8/40 - 2 MORE
Expensive parser function count	6/500 - unchanged
Unstrip recursion depth	0/20 - unchanged
Unstrip post-expand size	2/5,000,000 bytes - unchanged
Number of Wikibase entities loaded	0/400 - unchanged

Cambodia–Poland relations - deleted after 3rd AFD:

CPU time usage	0.016 seconds
Real time usage	0.023 seconds
Preprocessor visited node count	77/1,000,000
Post-expand include size	1,670/2,097,152 bytes
Template argument size	432/2,097,152 bytes
Highest expansion depth	5/40
Expensive parser function count	6/500
Unstrip recursion depth	0/20
Unstrip post-expand size	2/5,000,000 bytes
Number of Wikibase entities loaded	0/400

sandbox|Cambodia–Poland relations:

CPU time usage	0.016 seconds - unchanged
Real time usage	0.025 seconds - 0.002 seconds SLOWER
Preprocessor visited node count	76/1,000,000 - 1 fewer
Post-expand include size	1,949/2,097,152 bytes - 279 MORE
Template argument size	432/2,097,152 bytes - unchanged
Highest expansion depth	8/40 - 3 MORE
Expensive parser function count	6/500 - unchanged
Unstrip recursion depth	0/20 - unchanged
Unstrip post-expand size	2/5,000,000 bytes - unchanged
Number of Wikibase entities loaded	0/400 - unchanged


example debates - example debates - deleted after 2nd AFD:

CPU time usage	0.016 seconds
Real time usage	0.022 seconds
Preprocessor visited node count	73/1,000,000
Post-expand include size	1,123/2,097,152 bytes
Template argument size	225/2,097,152 bytes
Highest expansion depth	5/40
Expensive parser function count	6/500
Unstrip recursion depth	0/20
Unstrip post-expand size	2/5,000,000 bytes
Number of Wikibase entities loaded	0/400

sandbox|example debates:

CPU time usage	0.016 seconds - unchanged
Real time usage	0.028 seconds - 0.006 seconds SLOWER
Preprocessor visited node count	69/1,000,000 - 4 fewer
Post-expand include size	1,189/2,097,152 bytes - 66 MORE
Template argument size	210/2,097,152 bytes - 15 fewer
Highest expansion depth	7/40 - 2 MORE
Expensive parser function count	5/500 - 1 fewer
Unstrip recursion depth	0/20 - unchanged
Unstrip post-expand size	2/5,000,000 bytes - unchanged
Number of Wikibase entities loaded	0/400 - unchanged

example - survived 1 AFD:

CPU time usage	0.012 seconds
Real time usage	0.018 seconds
Preprocessor visited node count	75/1,000,000
Post-expand include size	973/2,097,152 bytes
Template argument size	105/2,097,152 bytes
Highest expansion depth	6/40
Expensive parser function count	6/500
Unstrip recursion depth	0/20
Unstrip post-expand size	2/5,000,000 bytes
Number of Wikibase entities loaded	0/400

sandbox|example:

CPU time usage	0.016 seconds - 0.004 seconds SLOWER
Real time usage	0.021 seconds - 0.003 seconds SLOWER
Preprocessor visited node count	67/1,000,000 - 8 fewer
Post-expand include size	959/2,097,152 bytes - 14 fewer
Template argument size	91/2,097,152 bytes - 6 fewer
Highest expansion depth	6/40 - unchanged
Expensive parser function count	4/500 - 2 fewer
Unstrip recursion depth	0/20 - unchanged
Unstrip post-expand size	2/5,000,000 bytes - unchanged
Number of Wikibase entities loaded	0/400 - unchanged


davidwr/(talk)/(contribs) 03:09, 25 February 2020 (UTC)[reply]

@SD0001, JJMC89, GeoffreyT2000, CambridgeBayWeather, Microchip08, B, and Arbitrarily0: I'd like to have a couple of people review the code change above before implementing it. If implemented, it should reduce the 'Expensive parser function count in pages like WP:Requests for undeletion and its archives by almost 50%. As an example, Wikipedia:Requests for undeletion/Archive 343 will go from 2331 to 1176. Granted, that is still above the limit of 500, but it illustrates the point. Once it is implemented, we can restore the "archive after" time on WP:Requests for undeletion back to a full week. davidwr/(talk)/(contribs) 03:18, 25 February 2020 (UTC)[reply]
Looks good to me. I don't think an increase in post-expand include size and highest expansion depth is significant, when compared to the reduction in expensive parser functions. That being said, I'm not sure why there's a 33% slowdown for the last test example, when all the other metrics seem to be for the better. SD0001 (talk) 04:23, 25 February 2020 (UTC)[reply]
Thanks for the review. Given that over half of the tranclusions are in archived undeletion requests, I'm going to push the button on this now. If it breaks something, we can revert. davidwr/(talk)/(contribs) 04:29, 25 February 2020 (UTC)[reply]